Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Native code



  How to check whether a struct implements an interface in GoLang

Unlike other programming languages like Java, when implementing an interface in GoLang, there is no syntax like below to explicit tell the relationship: type I interface { } type A struct implements I { } When looking at the code or running the code in GoLang, it might lead to a case one doesn't know whether a struct implements interface before trying to use it as some interface. According to GoLang spec, as long as a struct implements all functions of an interface, it is considered as having i...

   GOLANG,INTERFACE,IMPLEMENTATION,CHECK     2020-05-03 00:05:54

  Magic CSS shape

There is a question on StackOverflow which states that someone finds a CSS sample on http://css-tricks.com/examples/ShapesOfCSS/  , the sample shows a triangle created with pure CSS. The source code is :#triangle-up {width: 0;height: 0;border-left: 50px solid transparent;border-right: 50px solid transparent;border-bottom: 100px solid red;}The question is how these few lines can create a triangle? Next we give the answer and the detail illustration to this question We need to consider the B...

   CSS,Triangle,Box model,Border     2012-04-20 12:56:22

  GitHub Copilot may generate code containing GPL code

GitHub Copilot is a new AI-powered code completion tool that can generate code snippets from natural language descriptions. It is powered by OpenAI Codex, a deep learning system that has been trained on billions of lines of public code. GitHub Copilot claims to be a “copilot, not a pilot”, meaning that it is not intended to write code for you, but rather to help you write code faster and better. However, some developers have raised concerns about the legal and ethical implications of...

   GITHUB COPILOT,GPL     2023-04-21 14:21:29

  JavaScript-style object literals in PHP

The object literal notation in JavaScript looks like: var fido = {name: "Fido", barks: true}; or var fido = {}; fido.name = "Fido"; fido.barks = true; From assoc arrays to objects In PHP you would call that an associative array. $fido = array( 'name' => "Fido", 'barks' => true ); And you can easily make it an object too: $fido = (object)$fido; echo gettype($fido); // "object" Or if you want to start with a blank object and add stuff to it: $fido = (object)array(); or $fido...

   PHP,JavaScript,Object,Function call,Self vs this     2011-11-30 11:11:45

  HTML5 photo taking and uploading app implementation

Underthe support of HTML5 standard, Building Web App to take photos is now possible.I will elaborate on how to take photos using Web App, display them on the pageand upload them to the server. 1.     Videostream HTML5 TheMedia Capture API provides the programmable  access to video camera on phones, users canuse the getUserMedia() method to get the video stream provided by video camera.What we need to do is to add a HTML <video> tag and make the videostrea...

   HTML5,Photo taking,Media Capture API ,Implementation     2012-03-15 07:19:49

  Cloud Computing’s most Basic Concepts-Service Models

With the containerization of Docker, Kubernetes, CNCF, and the development of open-source communities, related frameworks and technology is booming and iterating rapidly. Cloud Computing, been applied for many years, is pushing developers into the new technological era. Companies and developers who are not using or not planning to use Cloud-Native gradually feel tremendous pressure in keeping up with the technology trends. The first step is to understand the concepts of IaaS, PaaS, FaaS, SaaS, S...

   CLOUD,PAAS,IAAS,CONCEPT     2021-01-24 05:23:11

  Understanding Slice Behavior in Go

In Go, understanding how slices behave when passed to functions is crucial for writing efficient and bug-free code. This behavior is often a source of confusion for many developers, especially those new to the language. In this article, we'll explore the difference between passing slices by value and by reference, and how it impacts the modification of slices within functions. Introduction In Go, slices are a fundamental data structure used to work with sequences of elements. They are essentiall...

   PASS BY REFERENCE,ARRAY,SLICE,PASS BY VALUE     2024-03-10 06:43:51

  Why does it take Task Manager longer to appear when you start it from the Ctrl+Alt+Del dialog?

Amit was curious why it takes longer for Task Manager to appear when you start it from the Ctrl+Alt+Del dialog compared to launching it from the taskbar. Well, you can see the reason right there on the screen: You're launching it the long way around. If you launch Task Manager from the taskbar, Explorer just launches taskmgr.exe via the usual Create­Process mechanism, and Task Manager launches under the same credentials on the same desktop. On the other hand, when you use the secure ...

   Windows,Task manager,Start time,Ctrl+Alt+Del     2012-02-02 07:06:56

  How Cloud Technologies Are Taking Over the World

Cloud technologies are some of the biggest accelerators of innovation today. The demand for increased speed and service delivery is driving the adoption and development of cloud platforms across industries. Gartner forecasts that the global public cloud service market will reach US$331.2 billion (S$455.83) in 2022, enjoying a 12.6% compounded annual growth rate. In Southeast Asia alone, it is estimated to reach US$40.32 billion (S$55.59 billion) by 2025 with a growing adoption among small and m...

   CLOUD,CLOUD COMPUTING     2019-10-18 12:12:12

  Windows 8 will support more development languages

Windows OS already supports many development languages, including C++, JavaScript/HTML5, iVisual Basic, Visual C# and XAML. However, Microsoft is trying to add more development language supports in the next-generation PC operating system Windows 8. Microsoft revealed that they would support more development languages for Windows 8 app development at the Lang.Next Conference this week.Microsoft development manager and chief executive Martyn Lovell, claimed that "I hope the developers can create a...

   Window 8,Development languages,Lang.Next     2012-04-05 06:03:23